<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class User extends Model {

	protected $fillable = [
		'six_id', 'is_admin',
	];

	public $timestamps = false;

	public function roles() {
		return $this->hasMany(Role::class);
	}

	public function business() {
		return $this->belongsToMany(Business::class, 'roles', 'user_id', 'business_id');
	}
}
